#define _CRT_SECURE_NO_WARNINGS 1

int missingNumber(int* nums, int numsSize) {
    int i = 0;
    int num = 0;
    for (i = 1; i <= numsSize; i++)
    {
        num ^= i;
        num ^= nums[i - 1];
    }
    return num;
}
